<table width="100%" cellpadding="10">
<?php function NavFront() { ?>
  <tr>
    <td>
   <?php
    $QNavTime = "SELECT * FROM timeclock_operations WHERE main_users_ref = {$_SESSION['UtID']} ORDER BY time_main DESC LIMIT 0,1";
	$NavTime = $GLOBALS['CONN']->db_array($QNavTime); ?>
   <table width="100%"  border="0" cellpadding="5" cellspacing="2">
  <tr bgcolor="#EAEAEA">
    <td width="20%">
	<?php if (is_null($NavTime[1]['OutTime'])) {?>
	</td>
    <td width="20%"><div align="center">
	<?php 
	$NavBreaks = split(";",$NavTime[1]['Breaks']);
	$CBreaks = count ($NavBreaks);
	$parImpar = ($CBreaks % 2 == 1) ? "impar" : "par";
	
	if ($parImpar == "impar") {?>
	<a href="index.php?action=StartBreak">Fazer sa�da</a></div></td>
    <?php } ?>
    <td width="20%"><div align="center">
	<?php if (is_null($NavTime[1]['LunchStart'])) { ?>
	<a href="index.php?action=StartLunch">Sair para AlmoÇo</a>
	<?php } elseif (is_null($NavTime[1]['LunchEnd'])) { ?>
	<a href="index.php?action=EndLunch">Regressar do AlmoÇo</a>	
	<?php } else {?>
	AlmoÇo
	<?php } ?>
	</div></td>
	<td width="20%"><div align="center"></div></td>
    <td width="20%"><div align="center"></div></td>
	<?php } else {?>
	Conclu�do</div></td>
	<?php } ?>
  </tr>
  </table>
  </td>
  </tr>
 <?php } function NavBack() { ?>
  <tr>
    <td> <div align="center"><table width="100%"  border="0" cellpadding="5" cellspacing="2"> 
	<tr bgcolor="#EAEAEA">
    <td width="20%"><div align="center"><a href="profilegest.php">Perfis</a></div></td>
    <td width="20%"><div align="center"><a href="index.php">Resumo</a></div></td>
    <td width="20%"><div align="center"><a href="delays.php">Aus�ncias</a></div></td>
    <td width="20%"><div align="center"><a href="delgest.php">Pedidos de Faltas</a> </div></td>
    <td width="20%"><div align="center"><a href="vacgest.php">F�rias</a></div></td>
  </tr>  </table>
    </div></td>
  </tr>
 <?php } function NavReport() { ?>
  <tr>
    <td><table width="100%"  border="0" cellpadding="5" cellspacing="2">   <tr bgcolor="#EAEAEA">
    <td width="20%"><a href="index.php?action=simulate">SimulaÇ&otilde;es</a></td>
    <td width="20%">OperaÇ&otilde;es</td>
    <td width="20%">Anular OperaÇ&otilde;es </td>
    <td width="20%">Pesquisa de OperaÇ&otilde;es </td>
    <td width="20%">&nbsp;</td>
    <td width="20%">&nbsp;</td>
  </tr> </table></td>
  </tr>
  <?php } ?>
</table>
